public class Role
{
    /// <summary>
    /// 玩家获取玩家ID
    /// </summary>
    /// <returns>玩家ID</returns>
    public extern int? api_get_role_id();

    /// <summary>
    /// 获取玩家所属阵营ID
    /// </summary>
    /// <returns>玩家所属阵营ID</returns>
    public extern int? api_get_camp_id();

    /// <summary>
    /// 获取玩家ID数值
    /// </summary>
    /// <returns>玩家ID数值</returns>
    public extern int? get_role_id_num();

    /// <summary>
    /// 获取玩家所属阵营ID数值
    /// </summary>
    /// <returns>玩家所属阵营ID数值</returns>
    public extern int? get_camp_id_num();

    /// <summary>
    /// 获取玩家名字
    /// </summary>
    /// <returns>玩家名字</returns>
    public extern string get_role_name();

    /// <summary>
    /// 获取玩家唯一名字
    /// </summary>
    /// <returns>玩家唯一名字</returns>
    public extern string get_role__unique_name();

    /// <summary>
    /// 获取玩家平台等级
    /// </summary>
    /// <returns>玩家等级</returns>
    public extern int? get_role_plat_map_level();

    /// <summary>
    /// 获取玩家控制者类型
    /// </summary>
    /// <returns>玩家控制者类型</returns>
    public extern int? get_role_type();

    /// <summary>
    /// 玩家是否中途加入
    /// </summary>
    /// <returns>是否中途加入</returns>
    public extern bool? is_middle_join();

    /// <summary>
    /// 获取玩家所属阵营对象
    /// </summary>
    /// <returns>阵营对象</returns>
    public extern Camp api_get_camp();

    /// <summary>
    /// 玩家设置属性
    /// </summary>
    /// <param name="k"> 属性名 </param>
    /// <param name="value"> 属性值 </param>
    /// <returns></returns>
    public extern void set_attr_val(string k,int? value);

    /// <summary>
    /// 获取玩家所有单位对象
    /// </summary>
    /// <returns>单位对象列表</returns>
    public extern UnitGroup get_all_unit_id();

    /// <summary>
    /// 设置玩家经验获得率
    /// </summary>
    /// <param name="rate"> 倍率 </param>
    /// <returns></returns>
    public extern void set_role_exp_rate(double? rate);

    /// <summary>
    /// 获得玩家经验倍率
    /// </summary>
    /// <returns>返回倍率</returns>
    public extern Fix32 get_role_exp_rate();

    /// <summary>
    /// 设置玩家出生点
    /// </summary>
    /// <param name="point"> 点 </param>
    /// <returns></returns>
    public extern void set_role_spawn_point(Point point);

    /// <summary>
    /// 获取玩家出生点
    /// </summary>
    /// <returns>返回出生点位置</returns>
    public extern Point get_role_spawn_point();

    /// <summary>
    /// 设置玩家队伍ID
    /// </summary>
    /// <param name="new_camp"> 队伍ID </param>
    /// <returns></returns>
    public extern void api_set_camp(Camp new_camp);

    /// <summary>
    /// 设置玩家名字
    /// </summary>
    /// <param name="name"> 名字 </param>
    /// <returns></returns>
    public extern void set_role_name(string name);

    /// <summary>
    /// 修改玩家资源
    /// </summary>
    /// <param name="res_key"> 资源名 </param>
    /// <param name="res_cnt"> 资源值 </param>
    /// <returns></returns>
    public extern void change_role_res(string res_key,Fix32 res_cnt);

    /// <summary>
    /// 设置玩家资源
    /// </summary>
    /// <param name="res_key"> 资源名 </param>
    /// <param name="res_cnt"> 资源值 </param>
    /// <returns></returns>
    public extern void set_role_res(string res_key,Fix32 res_cnt);

    /// <summary>
    /// 获得玩家资源
    /// </summary>
    /// <param name="res_key"> 资源名 </param>
    /// <returns>资源值</returns>
    public extern Fix32 get_role_res(string res_key);

    /// <summary>
    /// 设置玩家群体寻路严格模式
    /// </summary>
    /// <param name="group_navigate_mode"> 开启群体寻路严格模式 </param>
    /// <returns></returns>
    public extern void set_group_navigate_mode(bool? group_navigate_mode);

    /// <summary>
    /// 设置整数型参数到玩家存档栏位
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <param name="value"> 整型参数 </param>
    /// <returns></returns>
    public extern void set_save_data_int_value(int? index,int? value);

    /// <summary>
    /// 增加整数型参数到玩家存档栏位
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <param name="value"> 整型参数 </param>
    /// <returns></returns>
    public extern void add_save_data_int_value(int? index,int? value);

    /// <summary>
    /// 乘量实数型参数到玩家存档栏位
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <param name="value"> 实数型参数 </param>
    /// <returns></returns>
    public extern void mult_save_data_value(int? index,Fix32 value);

    /// <summary>
    /// 设置实数型参数到玩家存档栏位
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <param name="value"> 实数型参数 </param>
    /// <returns></returns>
    public extern void set_save_data_fixed_value(int? index,Fix32 value);

    /// <summary>
    /// 增加实数型参数到玩家存档栏位
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <param name="value"> 实数型参数 </param>
    /// <returns></returns>
    public extern void add_save_data_fixed_value(int? index,Fix32 value);

    /// <summary>
    /// 设置布尔型参数到玩家存档栏位
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <param name="value"> 布尔型参数 </param>
    /// <returns></returns>
    public extern void set_save_data_bool_value(int? index,bool? value);

    /// <summary>
    /// 设置字符串型参数到玩家存档栏位
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <param name="value"> 字符串型参数 </param>
    /// <returns></returns>
    public extern void set_save_data_str_value(int? index,string value);

    /// <summary>
    /// 设置表型参数到玩家存档栏位
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <param name="value"> 表型参数 </param>
    /// <returns></returns>
    public extern void set_save_data_table_value(int? index,dynamic value);

    /// <summary>
    /// set_save_table_key_value
    /// </summary>
    /// <param name="save_slot"> 玩家存档栏位 </param>
    /// <param name="key1"> key1 </param>
    /// <param name="value"> value </param>
    /// <param name="key2"> key2 </param>
    /// <param name="key3"> key3 </param>
    /// <param name="value_convert_func"> value_convert_func </param>
    /// <returns></returns>
    public extern void set_save_table_key_value(int? save_slot,string key1,dynamic value,string key2,string key3,string value_convert_func);

    /// <summary>
    /// add_save_table_key_value
    /// </summary>
    /// <param name="save_slot"> 玩家存档栏位 </param>
    /// <param name="key1"> key1 </param>
    /// <param name="value"> value </param>
    /// <param name="key2"> key2 </param>
    /// <param name="key3"> key3 </param>
    /// <returns></returns>
    public extern void add_save_table_key_value(int? save_slot,string key1,dynamic value,string key2,string key3);

    /// <summary>
    /// multiply_save_table_key_value
    /// </summary>
    /// <param name="save_slot"> 玩家存档栏位 </param>
    /// <param name="key1"> key1 </param>
    /// <param name="value"> value </param>
    /// <param name="key2"> key2 </param>
    /// <param name="key3"> key3 </param>
    /// <returns></returns>
    public extern void multiply_save_table_key_value(int? save_slot,string key1,dynamic value,string key2,string key3);

    /// <summary>
    /// remove_save_table_key_value
    /// </summary>
    /// <param name="save_slot"> 玩家存档栏位 </param>
    /// <param name="key1"> key1 </param>
    /// <param name="key2"> key2 </param>
    /// <param name="key3"> key3 </param>
    /// <returns></returns>
    public extern void remove_save_table_key_value(int? save_slot,string key1,string key2,string key3);

    /// <summary>
    /// get_save_table_key_value
    /// </summary>
    /// <param name="save_slot"> 玩家存档栏位 </param>
    /// <param name="key1"> key1 </param>
    /// <param name="key2"> key2 </param>
    /// <param name="key3"> key3 </param>
    /// <param name="default_value"> value </param>
    /// <param name="value_convert_func"> key2 </param>
    /// <returns></returns>
    public extern void get_save_table_key_value(int? save_slot,string key1,string key2,string key3,dynamic default_value,string value_convert_func);

    /// <summary>
    /// 上传玩家存档数据
    /// </summary>
    /// <param name="use_proxy"> 进行代理上传 </param>
    /// <returns></returns>
    public extern void upload_save_data(bool? use_proxy);

    /// <summary>
    /// 增加当前地图的指定key的存档值
    /// </summary>
    /// <param name="key"> 全局存档key值 </param>
    /// <param name="value"> 增加的数值 </param>
    /// <returns></returns>
    public extern void add_global_map_archive_data(string key,int? value);

    /// <summary>
    /// 获取玩家指定的全局存档key值对应排行榜的排名
    /// </summary>
    /// <param name="rank_key"> 全局存档key值 </param>
    /// <returns>整型</returns>
    public extern int? get_player_rank_num(string rank_key);

    /// <summary>
    /// 获取玩家指定的个人存档栏位对应排行榜的排名
    /// </summary>
    /// <param name="archive_key"> 玩家存档栏位 </param>
    /// <returns>整型</returns>
    public extern int? get_player_archive_rank_num(int? archive_key);

    /// <summary>
    /// 下载玩家存档数据
    /// </summary>
    /// <returns></returns>
    public extern void download_save_data();

    /// <summary>
    /// 重置下载档案数据回调
    /// </summary>
    /// <returns></returns>
    public extern void reset_download_save_data_callback();

    /// <summary>
    /// 读取整数型玩家存档数据
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <returns>整型</returns>
    public extern int? get_save_data_int_value(int? index);

    /// <summary>
    /// 读取实数型玩家存档数据
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <returns>定点数</returns>
    public extern Fix32 get_save_data_fixed_value(int? index);

    /// <summary>
    /// 读取布尔型玩家存档数据
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <returns>布尔值</returns>
    public extern bool? get_save_data_bool_value(int? index);

    /// <summary>
    /// 读取字符串型玩家存档数据
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <returns>字符串</returns>
    public extern string get_save_data_str_value(int? index);

    /// <summary>
    /// 读取表型玩家存档数据
    /// </summary>
    /// <param name="index"> 玩家存档栏位 </param>
    /// <returns>表</returns>
    public extern dynamic get_save_data_table_value(int? index);

    /// <summary>
    /// 玩家使用收费道具
    /// </summary>
    /// <param name="cnt"> 数量 </param>
    /// <param name="no"> 收费道具KEY </param>
    /// <returns></returns>
    public extern void api_use_store_item(int? cnt,int? no);

    /// <summary>
    /// 获取玩家收费道具数量
    /// </summary>
    /// <param name="no"> 收费道具key </param>
    /// <returns>收费道具数量</returns>
    public extern int? get_store_item_cnt(int? no);

    /// <summary>
    /// 玩家是否拥有单位的可见性
    /// </summary>
    /// <param name="unit"> 单位 </param>
    /// <returns>是否可见</returns>
    public extern bool? get_visibility_of_unit(Unit unit);

    /// <summary>
    /// 修改玩家科技等级
    /// </summary>
    /// <param name="tech_no"> 科技编号 </param>
    /// <param name="delta_lv"> 变化等级 </param>
    /// <returns></returns>
    public extern void api_change_tech_level(int? tech_no,int? delta_lv);

    /// <summary>
    /// 修改玩家科技等级
    /// </summary>
    /// <param name="tech_no"> 科技编号 </param>
    /// <param name="lv"> 等级 </param>
    /// <returns></returns>
    public extern void api_set_tech_level(int? tech_no,int? lv);

    /// <summary>
    /// 获取玩家科技等级
    /// </summary>
    /// <param name="tech_no"> 科技编号 </param>
    /// <returns>科技等级</returns>
    public extern int? api_get_tech_level(int? tech_no);

    /// <summary>
    /// 点对于玩家是否可见
    /// </summary>
    /// <param name="point"> 点 </param>
    /// <returns>布尔值</returns>
    public extern bool? is_point_visible_to_player(Point point);

    /// <summary>
    /// 点是否在迷雾中
    /// </summary>
    /// <param name="point"> 点 </param>
    /// <returns>布尔值</returns>
    public extern bool? is_point_in_fog(Point point);

    /// <summary>
    /// 点是否在黑色阴影中
    /// </summary>
    /// <param name="point"> 点 </param>
    /// <returns>布尔值</returns>
    public extern bool? is_point_in_shadow(Point point);

    /// <summary>
    /// 获取玩家状态
    /// </summary>
    /// <returns>玩家状态</returns>
    public extern int? get_role_status();

    /// <summary>
    /// 设置玩家是否是敌对关系
    /// </summary>
    /// <param name="role"> 玩家 </param>
    /// <param name="is_enemy"> 布尔变量 </param>
    /// <returns></returns>
    public extern void set_role_hostility(Role role,bool? is_enemy);

    /// <summary>
    /// 玩家是否是同盟关系
    /// </summary>
    /// <param name="role"> 玩家 </param>
    /// <returns>返回值</returns>
    public extern bool? players_is_alliance(Role role);

    /// <summary>
    /// 玩家是否是敌对关系
    /// </summary>
    /// <param name="role"> 玩家 </param>
    /// <returns>返回值</returns>
    public extern bool? players_is_enemy(Role role);

    /// <summary>
    /// 原始玩家对目标玩家开放视野
    /// </summary>
    /// <param name="role_2"> 玩家 </param>
    /// <returns>返回值</returns>
    public extern bool? share_source_player_vision_to_target(Role role_2);

    /// <summary>
    /// 原始玩家对目标玩家关闭视野
    /// </summary>
    /// <param name="role_2"> 玩家 </param>
    /// <returns>返回值</returns>
    public extern bool? close_source_player_vision_to_target(Role role_2);

    /// <summary>
    /// 原始单位对目标玩家开放视野
    /// </summary>
    /// <param name="unit"> 单位 </param>
    /// <returns>返回值</returns>
    public extern bool? share_source_unit_vision_to_target(Unit unit);

    /// <summary>
    /// 原始单位对目标玩家关闭视野
    /// </summary>
    /// <param name="unit"> 单位 </param>
    /// <returns>返回值</returns>
    public extern bool? close_source_unit_vision_to_target(Unit unit);

    /// <summary>
    /// 选中单位或单位组
    /// </summary>
    /// <param name="unit_or_unit_groupd"> 单位或单位组 </param>
    /// <returns></returns>
    public extern void role_select_unit(dynamic unit_or_unit_groupd);

    /// <summary>
    /// 开/关玩家鼠标的点选
    /// </summary>
    /// <param name="value"> 开/关 </param>
    /// <returns></returns>
    public extern void set_role_mouse_left_click(bool? value);

    /// <summary>
    /// 开/关玩家的鼠标的框选
    /// </summary>
    /// <param name="value"> 开/关 </param>
    /// <returns></returns>
    public extern void set_role_mouse_move_select(bool? value);

    /// <summary>
    /// 开/关玩家的鼠标滚轮
    /// </summary>
    /// <param name="value"> 开/关 </param>
    /// <returns></returns>
    public extern void set_role_mouse_wheel(bool? value);

    /// <summary>
    /// 设置玩家暗角开关
    /// </summary>
    /// <param name="value"> 暗角开关 </param>
    /// <returns></returns>
    public extern void set_role_vignetting_enable(bool? value);

    /// <summary>
    /// 设置玩家暗角大小
    /// </summary>
    /// <param name="value"> 暗角大小 </param>
    /// <returns></returns>
    public extern void set_role_vignetting_size(double? value);

    /// <summary>
    /// 设置玩家暗角呼吸周期
    /// </summary>
    /// <param name="value"> 呼吸周期 </param>
    /// <returns></returns>
    public extern void set_role_vignetting_breath_rate(double? value);

    /// <summary>
    /// 设置玩家暗角变化幅度
    /// </summary>
    /// <param name="value"> 变化幅度 </param>
    /// <returns></returns>
    public extern void set_role_vignetting_change_range(double? value);

    /// <summary>
    /// 设置玩家暗角颜色
    /// </summary>
    /// <param name="r"> R </param>
    /// <param name="g"> G </param>
    /// <param name="b"> B </param>
    /// <param name="interval"> Interval </param>
    /// <returns></returns>
    public extern void set_role_vignetting_color(double? r,double? g,double? b,double? interval);

    /// <summary>
    /// 设置玩家的基础操作快捷键（过滤掉禁止修改的）
    /// </summary>
    /// <param name="game_func_id"> 可编辑操作 </param>
    /// <param name="normal_key"> 功能键 </param>
    /// <param name="record_key"> 辅助键 </param>
    /// <returns></returns>
    public extern void api_set_role_editable_game_func(dynamic game_func_id,int? normal_key,int? record_key);

    /// <summary>
    /// 设置玩家的基础操作开关（包含所有基础操作）
    /// </summary>
    /// <param name="game_func_id"> 所有操作 </param>
    /// <param name="is_enable"> 开/关 </param>
    /// <returns></returns>
    public extern void api_set_role_all_game_func_enable(dynamic game_func_id,bool? is_enable);

    /// <summary>
    /// 基础操作响应的快捷键是否已被占用（过滤掉禁止修改的）
    /// </summary>
    /// <param name="normal_key"> 功能键 </param>
    /// <param name="record_key"> 辅助键 </param>
    /// <returns>是否</returns>
    public extern bool? api_is_conf_of_editable_game_func(int? normal_key,int? record_key);

    /// <summary>
    /// 获取玩家响应键盘按键的基础操作（过滤掉禁止修改的）
    /// </summary>
    /// <param name="normal_key"> 功能键 </param>
    /// <param name="record_key"> 辅助 </param>
    /// <returns>可修改基础操作</returns>
    public extern dynamic api_get_editable_game_func_of_shortcut(int? normal_key,int? record_key);

    /// <summary>
    /// 设置玩家布尔埋点数据
    /// </summary>
    /// <param name="key"> 布尔key </param>
    /// <param name="value"> 布尔值 </param>
    /// <returns></returns>
    public extern void set_bool_hit_point_data(int? key,bool? value);

    /// <summary>
    /// 设置玩家整型埋点数据
    /// </summary>
    /// <param name="key"> 整型key </param>
    /// <param name="value"> 整数 </param>
    /// <returns></returns>
    public extern void set_int_hit_point_data(int? key,int? value);

    /// <summary>
    /// 设置跟随距离
    /// </summary>
    /// <param name="follow_distance"> 跟随距离 </param>
    /// <returns></returns>
    public extern void api_set_follow_distance(Fix32 follow_distance);

    /// <summary>
    /// 设置玩家的鼠标样式
    /// </summary>
    /// <param name="cur_state_key"> 鼠标状态 </param>
    /// <param name="cur_key"> 鼠标key </param>
    /// <returns></returns>
    public extern void api_set_role_cursor(string cur_state_key,int? cur_key);

    /// <summary>
    /// 设置玩家的技能指示器特效
    /// </summary>
    /// <param name="skill_indicator_key"> 指示器特效枚举 </param>
    /// <param name="effect_key"> 特效key </param>
    /// <returns></returns>
    public extern void api_set_role_skill_indicator(int? skill_indicator_key,int? effect_key);

    /// <summary>
    /// 获取玩家颜色
    /// </summary>
    /// <returns>颜色</returns>
    public extern string api_get_role_color();

    /// <summary>
    /// 玩家是否为平台荣耀会员
    /// </summary>
    /// <returns>是否是会员</returns>
    public extern bool? api_is_honor_vip();

    /// <summary>
    /// 玩家是否为当前作者
    /// </summary>
    /// <returns>是否是作者</returns>
    public extern bool? api_is_cur_map_author();

    /// <summary>
    /// 获取玩家装备装饰类型的ID
    /// </summary>
    /// <param name="plat_deco_type"> 平台装饰类型 </param>
    /// <returns>装饰ID</returns>
    public extern int? api_get_equip_deco_id(int? plat_deco_type);

    /// <summary>
    /// 获取玩家在本地图的等级
    /// </summary>
    /// <returns>地图等级</returns>
    public extern int? api_get_map_level();

    /// <summary>
    /// 获取玩家在本地图的累计局数
    /// </summary>
    /// <returns>局数</returns>
    public extern int? api_get_played_times();

    /// <summary>
    /// 玩家在本地图的平台等级排名
    /// </summary>
    /// <returns>排名</returns>
    public extern int? api_get_map_level_rank();

    /// <summary>
    /// 玩家签到天数
    /// </summary>
    /// <param name="signin_type"> 签到天数类型 </param>
    /// <returns>签到天数</returns>
    public extern int? api_get_sign_in_days_of_platform(int? signin_type);

    /// <summary>
    /// 玩家在社区的互动
    /// </summary>
    /// <param name="community_type"> 平台社区类型 </param>
    /// <returns>个数</returns>
    public extern int? api_get_community_value(int? community_type);

    /// <summary>
    /// 玩家是否是当前地图的回流用户
    /// </summary>
    /// <returns>是否回流用户</returns>
    public extern bool? api_is_returning_player();

    /// <summary>
    /// 玩家是否收藏当前地图
    /// </summary>
    /// <returns>是否收藏当前地图</returns>
    public extern bool? api_is_bookmark_current_map();

    /// <summary>
    /// 获取玩家天梯的排位积分
    /// </summary>
    /// <param name="ladder_key"> 天梯key </param>
    /// <returns>积分</returns>
    public extern int? api_get_ladder_rank_points(string ladder_key);

    /// <summary>
    /// 获取玩家该地图累计充值
    /// </summary>
    /// <returns>累计充值</returns>
    public extern Fix32 api_get_role_total_consume();

    /// <summary>
    /// 获取玩家是否打赏该地图
    /// </summary>
    /// <returns>是否打赏该地图</returns>
    public extern bool? api_get_role_is_donated();

}
